-
-
Notifications
You must be signed in to change notification settings - Fork 26
Update OLG model #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update OLG model #168
Conversation
✅ Deploy Preview for taupe-gaufre-c4e660 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
|
Would someone mind to look into this build error for me? |
|
@Smit-create @shlff With apologies, I ended up cutting the quasi-linear exercise. Thanks for your efforts trying to make it work. Nonetheless, it was hard to clean up and it's a kind of unusual case. So I think what we have now is good. Perhaps @shlff could briefly review this and then @mmcky could merge? There's also a build error --- could someone please look into that (@mmcky or @Smit-create , if you have time?) |
|
Thanks, @jstac for the fixes. I'm having a look at the failures. |
shlff
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jstac and @Smit-create . This lecture looks very beautiful now.
Also great thanks for John's extremely helpful advice on academic writing.
I quickly reviewed the lecture. Please find my comments above and feel free to let me know if you like me to make any of those proposed changes @jstac .
| ``` | ||
|
|
||
| Let's observe the dynamics of the equilibrium price $R^*_{t+1}$. | ||
| Let's redo our plot above but now inserting the equilibrium quantity and price. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inserting -> insert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inserting is correct.
lectures/olg.md
Outdated
| cannot be obtained analytically. | ||
| To solve the equation we need to turn to Newton's method. | ||
| Instead, solve for $k^*$ using newton's method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newton's -> Newton's
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Also, "Instead, we solve".
lectures/olg.md
Outdated
| :label: crra_newton_2 | ||
| g(k^*) = k^* \left [ 1 + \beta^{-1/\gamma} (\alpha (k^*)^{\alpha-1})^{(\gamma-1)/\gamma} \right ] - (1-\alpha)(k^*)^{\alpha} | ||
| ``` | ||
| First let define $f$. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let define -> let's define
lectures/olg.md
Outdated
|
|
||
| ### Consumer's problem | ||
|
|
||
| Suppose that utility for individuals born at time $t$ take the form |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
take the form -> takes the form
lectures/olg.md
Outdated
| The first-order conditions for a maximum can be obtained by taking the derivative of the objective function with respect to capital and labor respectively and setting it to zero: | ||
| ### Demand | ||
|
|
||
| Using our assumption $\ell_1 = 1$ allows us to write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$\ell_1 = 1$ -> ``$\ell_t = 1$
| ax.plot(k_grid, k_grid_next, lw=2, alpha=0.6, label='$g$') | ||
| ax.plot(k_grid, k_grid, 'k-', lw=1, alpha=0.7, label='$45^{\circ}$') | ||
| ax.plot(k_grid, k_grid_next, lw=2, alpha=0.6, label='$g$') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to define $g$ in the math expression above.
| ax.plot(np.arange(ts_length), np.full(ts_length, k_star), | ||
| alpha=0.6, color='red', label=r'$k^*$') | ||
| ax.legend(fontsize=10) | ||
| ax.plot(k_grid, k_grid_next, lw=2, alpha=0.6, label='$g$') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
lectures/olg.md
Outdated
| ```{code-cell} ipython3 | ||
| def find_Rstar(K_prev, model): | ||
| return optimize.newton(find_Rstar_newton, 0.5, args=(K_prev, model)) | ||
| We introduce a function $g$ such that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we consider using other notations than $g$ to distinguish it from the $g$ used in the plot code above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. I've changed it to
|
Thanks @shlff , much appreciated. Merging. |
No description provided.